<script setup>
import {useCounterStore} from "@/store/counter.js";
const counter = useCounterStore()
</script>

<template>
<div>
  子组件2 - {{counter.count}} <button @click="counter.decrement()">-</button>
</div>
</template>

<style scoped>

</style>
